<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="renderer" content="webkit">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>风险保证金信息</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body>
<div class="Wrapper">
	 <form id="prj_prd_pay_rick_dep_form">
                        <div class="fieldset1 tabel_col tabel_col_s clearFix noBorder">
		               		  <div class="fieldBox col_100_auto">
				                    <div class="label">费用金额</div>
				                    <div class="field">
				                        <input name="feeAmt"  id="feeAmt" type="text" class="ui-textbox" value=""  validate="{required:true}" >
				                          <span class="requiredSymbol">*</span>
				                    </div>
		               		 </div>
		               		<!-- <div class="fieldBox col_100_auto">
				                    <div class="label">应收时间</div>
				                    <div class="field">
				                        <input name="payDt"  id="payDt" type="text" class="ui-datepicker" value=""  validate="{required:true}" >
				                          <span class="requiredSymbol">*</span>
				                    </div>
		               		 </div> -->
		               	   <div class="fieldBox col_100">
				                    <div class="label"> 备注</div>
				                    <div class="field">
				                    	<textarea name="rem" id="rem"    rows="4"  class="ui-textarea l-textarea" style="width:80%"  value=""  ></textarea>
				                    </div>
		               		 </div>
		               		   <div class="fieldset1 tabel_col tabel_col_s clearFix noBorder">
	                            <div class="caption">
	                                <span class="title">上传附件信息 </span>
	                            </div>
			           	 <div class="fieldBox col_100" id="fileDetail">
			                    <div class="label">资料上传</div>
			                    <div class="field">
			                    	<jsp:include page="../../system/sysUlFilesRec/sysSysUlFilesRecUpload2.jsp" flush="true" >
			                    		<jsp:param name="filePath" value="prjprdpayrickdep"/>
			                    	</jsp:include>
			                    	<span style="color: red">请上传汇款到账查询截图至附件，否则无法发起流程！</span>
			                    	<input name="prjPrdSchId" id="prjPrdSchId" type="hidden" value="${id}">
			                    </div>
			               </div>
	               </div>
                            </div>
                    </form>
	<script>
		$(function() {
			 var ligerForm = liger.get("prj_prd_pay_rick_dep_form");
		   $("#prj_prd_pay_rick_dep_form").ligerForm({
                validate: true
           });
		});
		 frameElement.dialog.onCancel = function(){
			 parent.$.ligerDialog.close();
			 parent.$(".l-dialog,.l-window-mask").css("display","none"); 
		 }
		 frameElement.dialog.onSave=function(){
			 frameElement.dialog.disabledBtns();
			 $.ligerDialog.confirm("确定要保存并发起风险保证金流程吗？", function (flag) {
					if(flag == false)return;
	        var ligerForm = liger.get("prj_prd_pay_rick_dep_form");
	        if (!ligerForm.valid()) {
	            top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO,SQ_type: "warning"});
	            return false; //验证不通过，不执行以下代码
	        }
	        var data = ligerForm.getData();
	        data["prjPrdSchId"] = $("#prjPrdSchId").val();
	        var fileParams = getUploadResultParams();//获取附件上传的信息
		    data["fileParams"] = JSON.stringify(fileParams);
	        var url = '<%=path%>/project/prjprdpayschm/addPrjPrdPayRickDep.do';
	        var wait_dialog;
	        $.ajax({
	    		type: 'post',
	    		dataType:'json',
	    		data:data,
	    		url: url,
	    		beforeSend: function(){
			          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
			     },
	    		success:function(msg){
	    			 wait_dialog.close();
	    			 if(msg.success == 1){
	    				 $("#prjPrdSchId").val(msg.data);
	    				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "success"});
	    				 parent.$.ligerDialog.close();
	     				parent.$(".l-dialog,.l-window-mask").css("display","none"); 
	    			 }else{
	    				 wait_dialog.close();
	    				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
	    			 }
	    		}
	    	});
	        
		});
		}
	</script>

</body>
</html>